package com.smyh.bean.Enum;

/**
 * 1-同步、2-升级、3-翻腕、4-亮灯
 * 
 * 对应：编码1-SYNC,2-_FC,3-RN_CUP,4-ON_LIGHT
 */
public enum SysCMDType {
	SYNC("同步", "SYNC"), UPDATE("升级", "UPDATE"), RN_CUP("翻腕", "RN_CUP"), ON_LIGHT("亮灯", "ON_LIGHT")
	,RESET("遥控复归","遥控复归"),TURN_CUP("遥控翻牌","遥控翻牌");

	private String name;
	private String index;

	// 构造方法
	private SysCMDType(String index, String name) {
		this.setIndex(index);
	}
	
	 // 普通方法  
    public static String getName(String index) {  
        for (SysCMDType faultType : SysCMDType.values()) {  
            if (faultType.getIndex().equals(index)) {  
                return faultType.name;  
            }  
        }  
        return " ";  
    }

	public void setIndex(String index) {
		this.index = index;
	}

	public String getIndex() {
		return index;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}
}
